home *** CD-ROM | disk | FTP | other *** search
/ World of Education / World of Education.iso / world_p / pccai.zip / CAI.DOC < prev    next >
Text File  |  1992-05-20  |  59KB  |  1,831 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                    PC-CAI 2.0
  10.  
  11.                     Computer Assisted Instructional Language
  12.                        for IBM PC and Compatible Computers
  13.  
  14.                        -----CONDENSED MANUAL ON DISK-----
  15.  
  16.                      (c)Copyright Alan C. Elliott, 1983-1990
  17.                                     TexaSoft
  18.                                  P.O. Box 1169
  19.                              Cedar Hill, Texas 75104
  20.                                  (214)-291-2115
  21.  
  22.  
  23.  
  24.      Version 2.0, October 1990
  25.  
  26.      ALL RIGHTS RESERVED. No patent liability is assumed with respect to
  27.      the use of the information contained herein. While every precaution
  28.      has been taken in the preparation of this publication, the publisher
  29.      assumes no responsibility for errors or omissions. Neither is any
  30.      liability assumed for damages resulting from the use of the
  31.      information herein.
  32.  
  33.      This manual is a condensed version of the bound and illustrated manual
  34.      you receive when you become a registered user.
  35.  
  36.      WHAT IS PC-CAI?
  37.  
  38.      - It is an authoring program
  39.      - It is an automated teacher's language
  40.      - It allows you write tutorials on any subject
  41.      - It allows you to write computer automated tests
  42.      - It allows you to automate diagnostic questionnaires
  43.      - It allows you to create program demos
  44.      - It allows you to create rolling demos and menus
  45.      - It allows you to be very creative
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                              Become a Registered User
  57.  
  58.  
  59.                                         1
  60.  
  61.      USING PC-CAI
  62.  
  63.      PC-CAI can be used by anyone who can use a word processor (which is
  64.      most people who use computers) because it is designed to work like a
  65.      word processor and not like a complicated programming language. In
  66.      fact, you can use the PC-CAI CREATE authoring program to write
  67.      tutorials without having to write a single line of programming code.
  68.  
  69.      PC-CAI allows you to create tutorials and run them directly from the
  70.      program editor without having to exit and go to another program.
  71.      PC-CAI gives you the capability of quickly creating a wide variety of
  72.      programs on the PC -- from tutorials to tests to rolling demos.
  73.  
  74.      SOME DIFFERENCES BETWEEN VERSION 1.00 and 2.0
  75.  
  76.      New commands in version 2.0 are the LINE command, the PCX (Display
  77.      Paintbrush Graphics) command and the CASE command. Improvements in the
  78.      commands ANIMATE, SCREEN, SHELL, WAIT, STOP, RECORD and other commands
  79.      have been made. Also, in version 2.0 you can encode the CAI program
  80.      file so that it cannot be read by unauthorized persons. Other
  81.      improvements have also been made.
  82.  
  83.      GETTING STARTED WITH PC-CAI
  84.  
  85.      To load PC-CAI on the hard disk, place the PC-CAI distribution disk
  86.      in the A: drive. Make A: the default disk. Enter the command
  87.  
  88.      INSTALL
  89.  
  90.      and follow the instructions on the screen.
  91.  
  92.  
  93.  
  94.      
  95.  
  96.  
  97.  
  98.      To print LATENEWS.DOC, use the command:
  99.  
  100.      A>COPY LATENEWS.DOC LPT1:
  101.  
  102.      This documentation lists any changes that have been made since the
  103.      printing of this manual.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.                              Become a Registered User
  116.  
  117.  
  118.                                         2
  119.  
  120.      REQUIREMENTS TO RUN PC-CAI 2.0
  121.  
  122.      1. An IBM PC, XT, AT or compatible computer.
  123.      2. DOS 2.0 or higher.
  124.      3. At least 320K of memory.
  125.      4. Any monitor, hard disk or floppy. NOTE: Color graphics monitors are
  126.      preferred, and the DEMO program assumes you have a graphics monitor.
  127.  
  128.      USING PC-CAI
  129.  
  130.      PC-CAI is a computer language specifically designed to allow you to
  131.      create computer driven tutorials, tests, and demos.
  132.  
  133.      WHERE PC-CAI FITS IN
  134.  
  135.      PC-CAI is a CAI (Computer Assisted Instruction) language based on the
  136.      C.A.L.L. (Computer Assisted Learning Language) command set. PC-CAI is
  137.      a superset of this original language. (Reference: "The Roll of CALL as
  138.      a Teacher's Computer Language", Collegiate Microcomputer, February,
  139.      1985, Volume III, No.1 ) It works much like a word processor.
  140.  
  141.      SUGGESTED LEARNING SCHEME
  142.  
  143.      1) Go through the PC-CAI tutorials provided on disk
  144.      2) Learn to use the EDITOR.
  145.      3) Learn to use the "dot" commands as described in the
  146.         COMMANDS section. (Study the tutorials on disk)
  147.      4) Learn the "@" AT commands.
  148.      5) Learn to integrate graphics into your tutorial.
  149.  
  150.      SETUP DEFAULT PARAMETERS FOR PC-CAI
  151.  
  152.      Run the PC-CUTIL program to set up program defaults. Enter the
  153.      command:
  154.  
  155.      C>CAI-UTIL
  156.  
  157.      SET UP DEFAULTS FOR CAI
  158.  
  159.      Choose to set up defaults for the editor program. You will be asked
  160.      for the name of the disk drive where the programs will reside. The
  161.      normal default values will be in parentheses, and you may simply press
  162.      enter to accept these values.
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.                              Become a Registered User
  175.  
  176.  
  177.                                         3
  178.  
  179.      SETUP for CREATE PROGRAM
  180.  
  181.      A setup routine for the CREATE program is also in the CAI-UTIL
  182.      program. In this routine you may choose  default values for use in the
  183.      CREATE program.
  184.  
  185.      PC-CAI TUTORIALS ON DISK
  186.  
  187.      Two tutorials are available on disk to help you learn about PC-CAI and
  188.      how it works. The first tutorial you should look at is the DEMO
  189.      program. Begin the PC-CAI DEMO with the command (from DOS). Note: this
  190.      program requires that your monitor support CGA type graphics.
  191.  
  192.      C>CAI DEMO
  193.  
  194.      This program will demonstrate some of the things you can do in PC-CAI.
  195.      There is also a tutorial named CREATE that explains how to use the
  196.      CREATE program -- the PC-CAI authoring program. To begin the CREATE
  197.      program, enter the command (from DOS):
  198.  
  199.      C>CAI CREATE
  200.  
  201.      THE PC-CAI EDITOR
  202.  
  203.      The PC-CAI Editor is a standard ASCII text editor. You can use any
  204.      ASCII text editor to write PC-CAI programs, but the CAI editor allows
  205.      you to easily go back and forth from the editor to running the
  206.      program. To begin the CAI program (here from disk C), enter
  207.  
  208.      C>CAI
  209.  
  210.      Optionally, if you are editing an existing document, you may give the
  211.      command:
  212.  
  213.      C>CAI FILENAME /EDIT
  214.  
  215.      Where "FILENAME" is the name of the file to edit.
  216.  
  217.      PROGRAM TIP:Once you have CAI code in the CAI editor, you may begin
  218.      the CAI program that is in the editor's memory by pressing CTRL-G
  219.      (GO). That is, hold the CTRL key down and press the G key once.
  220.  
  221.      NUMERIC KEYPAD COMMANDS
  222.  
  223.      Home - Puts the cursor at left margin.
  224.      Arrow Keys(right, left, up, down) - Move in direction of the arrow.
  225.      End - Moves the cursor to the end of the current line.
  226.      PgUp (Page Up) - Move 11 lines up the document.
  227.      PgDn (Page Down) - Move 11 lines down the document.
  228.      Del - Deletes the character at which the cursor is located.
  229.      Ins - Turns on the character insert mode.
  230.      Tab --|> Moves to next tab position (see Ctrl-T, CTRL-K)
  231.      Esc - End: Exits the editor.
  232.  
  233.                              Become a Registered User
  234.  
  235.  
  236.                                         4
  237.  
  238.  
  239.      FUNCTION KEYS
  240.  
  241.      F1-Help
  242.      F2-Delete: Deletes a specified number of lines
  243.      F3-Top: Top of file
  244.      F4-Bottom: Bottom of file
  245.      F5-Files: Get a file
  246.      F6-Center: Centers text, also see ".CEN"
  247.      F7-Exit: Saves file to disk
  248.      F8-Clear: Clears contents of editor, not buffer.
  249.      F9-Mark: Mark upper left and bottom right of text to be copied.
  250.      F10-Copy: Copy/insert a marked rectangular block of text.
  251.  
  252.      CONTROL COMMANDS (CTRL)
  253.  
  254.      ^A-Convert to UPPER case
  255.      ^C-Copy overwrites. See F10
  256.      ^D-Deletes to the right of the cursor
  257.      ^F-Fills the text from the current line to the next blank line.
  258.  
  259.      ^G - "GO" - When you press this command, PC-CAI will begin running the
  260.      program that is currently in the editor. This allows you to
  261.      immediately try out your program.
  262.  
  263.      ^J-Justify right
  264.      ^K-Changes the "Help Bars" at the bottom of the screen
  265.      ^L-Reset the line length specifications within CAI
  266.      ^R-Search and Replace.
  267.      ^S-Search for a specified text.
  268.      ^T-Set the tab settings by entering up to 20 tabs.
  269.      ^W-Delete word
  270.      ^Y-Delete entire line
  271.      ^Z-Convert to lower case
  272.      ^F1 - Shell to DOS. Return by typing EXIT.
  273.  
  274.      BE CAUTIOUS - SAVE OFTEN
  275.  
  276.      Issue the F7 "Save" command periodically to protect your work - say
  277.      every 10 to 30 minutes.
  278.  
  279.      CAI EDITOR TUTORIAL
  280.  
  281.      The following tutorial gives you a better understanding of how to use
  282.      the PC-CAI editor to create PC-CAI programs. The example described
  283.      here requires a CGA compatible monitor. To begin the CAI program
  284.      editor, make sure you are in the correct directory. If your PC-CAI
  285.      directory is named \CAI, for example, enter the DOS command
  286.  
  287.      CD \CAI
  288.  
  289.      To begin the editor, enter the following command from the DOS
  290.      prompt:
  291.  
  292.                              Become a Registered User
  293.  
  294.  
  295.                                         5
  296.  
  297.  
  298.      CAI
  299.  
  300.      Enter the following text, exactly as it appears on the next page: As
  301.      you are entering entering this text, check:
  302.  
  303.      1. Is everything spelled correctly?
  304.      2. Did you use the number 1, not the letter el?
  305.      3. Did you use the number 0, not the letter oh?
  306.      4. Is there a blank space after each command that
  307.      begins with a dot (.)  (ie. A space between the SCREEN and 0 in the
  308.      first line.)
  309.  
  310.      HERE IS THE TEXT TO ENTER:
  311.  
  312.           .SCREEN 0
  313.           .COLOR 15,1
  314.           .CLS
  315.           .SKIP 12
  316.           .CENTER (*My Very First Program*)
  317.           .CENTER (*Written in PC-CAI*)
  318.  
  319.           This example illustrates how simple it is to enter
  320.           information into the PC-CAI editor and to make it into a
  321.           running program.
  322.  
  323.           .LOCATE 24,1
  324.           .PAUSE
  325.           .SCREEN 1
  326.           .CLS
  327.           .CIR CENTER=(160, 265) RADIUS=300 COLOR=2
  328.           .CIR CENTER=(160, 300) RADIUS=300 COLOR=2
  329.           .PAINT CENTER=(170, 20) COLOR=2 BOUND=2
  330.           .LOCATE 21,1
  331.           PC-CAI will make you a winner by a mile!
  332.           .LOAD RUNNER1,RUNNER2,RUNNER3,RUNNER4
  333.           .ANIMATE (1,100)-(250,100) STEPX=4 STEPY=0 PAUSE=1
  334.           .LOCATE 24,1
  335.           .PAUSE
  336.           .SCREEN 0
  337.           @STOP
  338.  
  339.      If everything looks okay, save the tutorial to disk. To do this, press
  340.      the F7-Save function key. You will be prompted to enter the name of
  341.      the file. Enter TUTOR. You will be asked if you want to Quit or Return
  342.      to the Editor. Choose Return.
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.                              Become a Registered User
  352.  
  353.  
  354.                                         6
  355.  
  356.      RUNNING THE PROGRAM
  357.  
  358.      To run this program from the editor, press CTRL-G. If you get an error
  359.      message while running the program, skip to the next paragraph. The
  360.      first screen should be a title screen, and a prompt to press Enter at
  361.      the bottom. When you press Enter, you should see an animation
  362.      sequence. Press Enter again, and you will be asked if you want to Quit
  363.      PC-CAI or return to the editor. Choose to return.
  364.  
  365.      If an error occurs while you are running the program, you may get a
  366.      message asking of you want to Quit or Return to the editor. Choose to
  367.      return to the editor. If the error causes you to return to DOS, you
  368.      can get back into the editor with the command from the DOS prompt:
  369.  
  370.      CAI TUTOR.CAI/EDIT
  371.  
  372.      Check the code for mistakes and try again. When the program runs
  373.      successfully, save it again (use F7) to the file TUTOR. To end the
  374.      editor, press the ESC key and answer the prompts. To run the TUTOR
  375.      program directly from the DOS prompt, use the command:
  376.  
  377.      CAI TUTOR
  378.  
  379.      PRINTING FILES YOU HAVE CREATED
  380.  
  381.      To print files you have created, use the DOS PRINT command (See DOS
  382.      manual) or the COPY command to print the file. For example use one of
  383.      the following commands to print the file TUTOR.CAI:
  384.  
  385.      COPY TUTOR.CAI LPT1:
  386.  
  387.      or
  388.  
  389.      PRINT TUTOR.CAI
  390.  
  391.  
  392.      USING CREATE TO WRITE A PROGRAM
  393.  
  394.      There are two ways to create a PC-CAI program. The first is to use the
  395.      authoring program called CREATE. The second method is to enter the CAI
  396.      commands and text directly into the editor, which is discussed later.
  397.  
  398.      CREATING A PC-CAI PROGRAM WITH THE CREATE PROGRAM
  399.  
  400.      The PC-CAI Program Generator, CREATE, is simple to use. However, you
  401.      must have a basic understanding about how a PC-CAI tutorial is set up.
  402.      Refer to the CREATE tutorial on disk for more information on how to
  403.      use CREATE.
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.                              Become a Registered User
  411.  
  412.  
  413.                                         7
  414.  
  415.      RUNNING THE PROGRAM
  416.  
  417.      To run a program from the DOS prompt after it has been created, use
  418.      the command:
  419.  
  420.      CAI filename
  421.  
  422.      where filename is the name of the tutorial. You may also run the
  423.      program from the CAI editor by bringing the program code into the
  424.      editor and pressing the CTRL-G command key.
  425.  
  426.                        USING THE EDITOR TO WRITE A PROGRAM
  427.  
  428.      Using the CAI editor, you can create a program or edit an existing
  429.      program. A PC-CAI program consists of text, which is output literally
  430.      from the program file, and commands which are acted upon according to
  431.      their meanings. Each command begins with either an "at" sign (@) or a
  432.      dot (.). These command markers must appear in the first column of a
  433.      program line. At "@" commands are restricted in where they may appear
  434.      within a program. Dot "." commands may appear on any line of a PC-CAI
  435.      program stream. AT commands and DOT commands are listed in
  436.      alphabetical order along with an explanation about how they are used.
  437.  
  438.      LONG LINES
  439.  
  440.      If a command will not fit on one line, extend the line by placing an &
  441.      at the end of the line. For example,
  442.  
  443.      @RIGHT(*&
  444.      WASHINGTON*)
  445.  
  446.      will be read by PC-CAI as
  447.  
  448.      @RIGHT(*WASHINGTON*)
  449.  
  450.                          USING AT COMMANDS (@ Commands)
  451.  
  452.      As commands are defined, it will be indicated when a command is
  453.      required within a Question section. If a command is not required, it
  454.      is optional. Command parameters which appear in brackets "[]" are
  455.      optional. For instance the @RIGHT command is
  456.  
  457.      @RIGHT (*ANSWER*) [KEYWORD,EXACT,EXACT
  458.      NOCASE,DECIMAL,LIST, SOUNDEX,FORCE,FORCE NOCASE]
  459.  
  460.      The text in (* *) is a required parameter to the @RIGHT command, but
  461.      the parameters in brackets [] such as KEYWORD, EXACT, and EXACT NOCASE
  462.      are optional. If one of the optional parameters is assumed (default)
  463.      that parameter will be mentioned as such. For the @RIGHT command, if
  464.      none of the optional parameters is given, KEYWORD is assumed. Only the
  465.      first three letters of an "at" or "dot" command are required (ie @RIG
  466.      for @RIGHT.)
  467.  
  468.  
  469.                              Become a Registered User
  470.  
  471.  
  472.                                         8
  473.  
  474.                        @BEGIN QUESTION and @END QUESTION
  475.  
  476.      The @Begin Question and @End Question commands signal the beginning
  477.      and ending of a question session.
  478.  
  479.      FORMAT: @BEGIN QUESTION [NOCOUNT] and @END QUESTION
  480.  
  481.      These commands are a required part of the QUESTION section. The
  482.      optional parameter NOCOUNT indicates that this question should not be
  483.      counted in any grading that is requested. This is helpful when a
  484.      question is used to perform branching.
  485.  
  486.                                      @CASE
  487.  
  488.      The CASE command allows you to create menus that will branch to other
  489.      parts of the program according to the option selected from the menu.
  490.      The format of the @CASE command is:
  491.  
  492.      @CASE (*KEYS,LABEL1,LABEL2,...*) [CENTER][BORDER][JUSTIFY]
  493.      MENU LINE 1
  494.      MENU LINE 2
  495.      etc
  496.      @END
  497.          
  498.      The @CASE command consists of information on the command line plus
  499.      several other lines of information which comprise the text of the
  500.      menu. The @END command signals the end of the @CASE command. The
  501.      parameters in the @CASE command line are as follows:
  502.  
  503.      KEYS - The keys are single letter "HOT KEYS" that correspond to the
  504.      menu options. The first letter in the key list corresponds to the
  505.      first label in the label list, etc. Generally, these keys will be
  506.      numbers (ie. 1234) or letters (ie. ABCD).
  507.  
  508.      LABELS - The labels correspond to hot keys. When a hot key is pressed,
  509.      the program will search for a matching label (like in the
  510.      @GOBACK command). For example, if the hot keys are 123, and the
  511.      labels are LAB1,LAB2,LAB3, and if the user presses the key "2", the
  512.      program will then look for a line @LABEL:LAB2, and will branch to
  513.      the line following that label.
  514.  
  515.      MENU LINES - Menu lines are lines that will be printed each time the
  516.      @CASE command is encountered. All lines up to the @END command are
  517.      menu lines.
  518.  
  519.      BORDER OPTION - If the word BORDER appears in the @CASE command, a
  520.      border will be drawn around the menu lines.
  521.  
  522.      CENTER OPTION - The menu lines will be centered on the screen.
  523.  
  524.      RIGHT OPTION - The menu lines will be justified on the right edge of
  525.      the screen.
  526.  
  527.  
  528.                              Become a Registered User
  529.  
  530.  
  531.                                         9
  532.  
  533.      If neither the RIGHT or CENTER options are specified, the menu lines
  534.      will appear on the left  of the screen. An example of @CASE:
  535.  
  536.           .rem Example of using the @CASE command to create a menu
  537.           @LABEL:BEGIN
  538.           .screen 0
  539.           .cls
  540.           .locate 10,1
  541.           @CASE(*ABCD:PCX,ANIM,MOVE,END*) center border
  542.           A - Show A Sample PCX Graphics File
  543.           B - Show a Sample Animation
  544.           C - Show Sample Move
  545.           D - End This Program
  546.           @END
  547.           .pause
  548.           @LABEL:PCX
  549.           .rem place code here to display PCX file
  550.           @GOBACK:BEGIN
  551.           @LABEL:ANIM
  552.           .rem place code here to do animation
  553.           @GOBACK:BEGIN
  554.           @LABEL:MOVE
  555.           .rem place code here to perform a move
  556.           @GOBACK:BEGIN
  557.           @LABEL:END
  558.           .rem place ending code here
  559.           .pause (*Press Enter to End this Program*)
  560.           @STOP menu
  561.  
  562.                                       @END
  563.  
  564.      See description of @BEGIN QUESTION and @CASE.
  565.  
  566.                                      @ESCAPE
  567.  
  568.      Defines what to do if the user presses the ESC key during a tutorial.
  569.      The default option is MENU.
  570.  
  571.      FORMAT: @ESC [MENU,SYSTEM]
  572.  
  573.      Thus, to cause the program to go to the CAI menu, place the command
  574.  
  575.      @ESC MENU
  576.  
  577.      at the beginning of the tutorial. If you want the program to return to
  578.      DOS, use
  579.  
  580.      @ESC SYSTEM
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.                              Become a Registered User
  588.  
  589.  
  590.                                         10
  591.  
  592.                                @GOTO and @GOBACK
  593.  
  594.      The GOTO command is used to skip a portion of PC-CAI code, and to go
  595.      FORWARD in the program to a designated label (see @LABEL). The
  596.      @GOBACK command begins looking for the matching label at the top of
  597.      the program downward through the code.
  598.  
  599.      FORMAT @GOTO:label or @GOBACK:label
  600.  
  601.      Examples:
  602.  
  603.      @GOTO:NEXTSTEP
  604.  
  605.      @GOBACK:BEGINNING
  606.  
  607.      Must appear only OUTSIDE of a QUESTION SECTION.
  608.  
  609.                                        @IF
  610.  
  611.      The @IF command provides FORWARD branching in response to the result
  612.      of the last Question section. The format of the command is:
  613.  
  614.      @IF (RIGHT, WRONG) [then] :label
  615.  
  616.      @IF may appear only OUTSIDE a Question section. The IF statement
  617.      may be used to cause backward branching by going to a label which
  618.      is then followed by a GOBACK statement. When grading is being
  619.      performed, it would probably be advisable to use the NOCOUNT option of
  620.      the @BEGIN statement in the question used for branching. Example:
  621.  
  622.      @IF RIGHT then :FORWARD
  623.      :
  624.      :
  625.      @LABEL:FORWARD
  626.  
  627.                                      @LABEL
  628.  
  629.      Format: @LABEL:label
  630.  
  631.      To provide a location for the @CASE, @GOTO, @GOBACK, or @IF statements
  632.      to restart program flow. Labels may appear only OUTSIDE a Question
  633.      section.
  634.  
  635.      Example:
  636.  
  637.      @LABEL:NEXTSTEP
  638.  
  639.                                      @MENU
  640.  
  641.      Purpose:Displays a menu of .CAI program on the default disk, and gives
  642.      the user the opportunity to select from the menu any program to run.
  643.  
  644.      Format: @MENU
  645.  
  646.                              Become a Registered User
  647.  
  648.  
  649.                                         11
  650.  
  651.  
  652.                                     @OPTIONS
  653.  
  654.      Purpose:Select options that describe certain details of how the
  655.      program will run. Specify what to do when the ESC key is pressed.
  656.  
  657.      Format: @OPTIONS [ESCAPE, NOESCAPE, NOEDIT]
  658.  
  659.      If ESCAPE is set, the program will watch for the ESCAPE key to be
  660.      pressed.  If the ESC is pressed, the program will display the menu of
  661.      *.CAI programs or go to the system, whichever has been specified in
  662.      the @ESC command.  Go to menu is the default. If NOESCAPE is set, the
  663.      program will ignore the pressing of the ESC key during a tutorial.
  664.  
  665.      The NOEDIT option means that when the tutorial is over, the user will
  666.      not be given the option to edit the program. This is a safety measure
  667.      to prevent unauthorized persons to see the actual program code.
  668.  
  669.                                      @READ
  670.  
  671.      Format:@READ [(*prompt*)]
  672.  
  673.      Purpose: To allow the user to input an answer to a question. This
  674.      command is a required part of a QUESTION section. May appear only
  675.      within a Question section.
  676.  
  677.      Example: The statement
  678.  
  679.      @READ (*ENTER THE ANSWER HERE: *)
  680.  
  681.      will produce the following prompt on the screen...
  682.  
  683.      ENTER THE ANSWER HERE:_
  684.  
  685.      And the program will wait for a response from the user.
  686.  
  687.                                      @RIGHT
  688.  
  689.      The purpose of the @RIGHT command is to define the correct answer to
  690.      the question.
  691.  
  692.      Format:@RIGHT (*answer*) [KEYWORD, EXACT, EXACT NOCASE, DECIMAL,
  693.      LIST, SOUNDEX, FORCE, FORCE NOCASE]
  694.  
  695.      Remarks: Text lines which follow the @RIGHT command are displayed if
  696.      the user's answer properly matches the designated right answer. At
  697.      least one @RIGHT statement must appear in a Question section.
  698.  
  699.      KEYWORD: The KEYWORD parameter indicates that the user's answer must
  700.      be a word or phrase which is contained in the indicated right answer.
  701.      KEYWORD is the default condition.
  702.  
  703.      EXACT: The EXACT parameter indicates that the user's answer must match
  704.  
  705.                              Become a Registered User
  706.  
  707.  
  708.                                         12
  709.  
  710.      exactly, including case (upper and lower case).
  711.  
  712.      EXACT NOCASE: The EXACT NOCASE indicates that the user's answer must
  713.      match exactly, where case does not matter.
  714.  
  715.      LIST: The LIST parameter allows the answer to be a list of words
  716.      separated by commas such as (*wheat,barley,oats*). Case is not
  717.      checked.
  718.  
  719.      DECIMAL: The DECIMAL parameter allows the answer to be a number or
  720.      range of numbers such as (*10.5*) for a single number or (*10;20*) for
  721.      a range of numbers from 10 to 20.
  722.  
  723.      SOUNDEX: The SOUNDEX parameter allows the answer to match even if
  724.      spelling is slightly wrong. For instance, the words SMITH, SMYTH, and
  725.      SMYTHE would all match the correct answer SMITH. Case is not checked
  726.      in SOUNDEX answers.
  727.  
  728.      FORCE: The FORCE parameter forces the student to enter the correct
  729.      answer. No other entry is accepted. If FORCE NOCASE is used, case is
  730.      not checked.
  731.  
  732.      EXAMPLES OF @RIGHT COMMAND:
  733.  
  734.      @RIGHT (*WASHINGTON*)
  735.  
  736.      would allow "G WASHINGTON" or "GEORGE WASHINGTON" or "FRED
  737.      Washington" as correct answers. (KEYWORD match)
  738.  
  739.      @RIGHT (*C*) EXACT
  740.  
  741.      would allow "C" only as a correct answer, "c" would be considered
  742.      incorrect.
  743.  
  744.      @RIGHT (*C*) EXACT NOCASE
  745.  
  746.      would allow both "C" and "c" as correct answers.
  747.  
  748.      @RIGHT (*WASHINGTON*)
  749.  
  750.      George Washington is correct!
  751.  
  752.      In the above example, if the user answers the question correctly, the
  753.      text "George Washington is correct!" is displayed. The text following
  754.      @RIGHT may contain any dot command. All text up to the next "@"
  755.      command will be displayed.
  756.  
  757.                                      @SHELL
  758.  
  759.      Allows you to enter DOS commands or other commands from a CAI
  760.      tutorial.
  761.  
  762.      Format: @SHELL (*DOSCOMMAND*)
  763.  
  764.                              Become a Registered User
  765.  
  766.  
  767.                                         13
  768.  
  769.  
  770.      If @SHELL is used with no options, it returns control to DOS
  771.      temporarily. To return to PC-CAI, you must enter EXIT at the DOS
  772.      prompt.
  773.  
  774.      If information is included in the (*DOSCOMMAND*) option, the text in
  775.      (* *) will be sent to the system. After the command is completed, the
  776.      program will return to PC-CAI at the point just after the SHELL
  777.      command. For example, to cause a DOS Directory command to be executed,
  778.      enter the command
  779.  
  780.      @SHELL (*DIR*)
  781.  
  782.      Once the directory has been displayed, control is returned to PC-CAI
  783.      in the tutorial program where it left off.
  784.  
  785.                                      @STOP
  786.  
  787.      Format: @STOP [MENU, SYSTEM],  [GRADE]  [SCREEN, FILE=filename]
  788.  
  789.      Purpose: Ends the PC-CAI program, and either (by optional
  790.      specifications) returns to the PC-CAI menu, grades the tutorial,
  791.      goes to system, or (when no optional parameter is specified) will
  792.      prompt the user...
  793.  
  794.      Please choose   1) End CAI or
  795.                      2) Go to Editor
  796.  
  797.      When the GRADE option is chosen, one of two of the sub-options SCREEN
  798.      or FILE= may also be chosen. This specifies where the grading will be
  799.      output. Grading to the screen gives a summary, and grading to a file
  800.      gives detail about whether each question was answered right or wrong.
  801.      When the SYSTEM option is given, the program return to DOS.
  802.  
  803.      WARNING -- BE VERY CAREFUL WHEN USING THIS IN THE EDITOR. IF YOU
  804.      DO NOT SAVE YOUR PROGRAM AND RUN (CTRL-G) IT WITH AN @STOP SYSTEM, THE
  805.      PROGRAM WILL END, AND RETURN TO THE SYSTEM, AND YOUR INFORMATION IN
  806.      THE EDITOR MAY BE LOST UP TO YOUR LAST SAVE!!!!! <D>
  807.  
  808.                                      @TRIES
  809.  
  810.      Format: @TRIES [N]
  811.  
  812.      Purpose: To specify how many wrong answers to allow the user before
  813.      moving to the next question. The default number is one.
  814.  
  815.                                      @WRONG
  816.  
  817.      Format: @WRONG [(*answer*) [KEYWORD, EXACT, EXACT, NOCASE, DECIMAL,
  818.      LIST, SOUNDEX, FORCE, FORCE NOCASE][FINAL]
  819.  
  820.      Purpose:To define text to display when a wrong answer is given. The
  821.      parameters KEYWORD through FORCE NOCASE indicate that type of match to
  822.  
  823.                              Become a Registered User
  824.  
  825.  
  826.                                         14
  827.  
  828.      a specific wrong answer, and have the same meanings as in @RIGHT. An
  829.      @WRONG statement which has no answer indicated is called a "general
  830.      wrong answer". When a user's answer does not match any right answers
  831.      or any specific wrong answers, then the text following the general
  832.      wrong answer is displayed. FINAL indicates that the text following the
  833.      @WRONG statement will be displayed when all tries are exhausted, and
  834.      no right answer has been given. Example:
  835.  
  836.      @WRONG (*LINCOLN*)
  837.  
  838.      Lincoln was a president during the civil war.
  839.  
  840.      would cause the text about Lincoln to be displayed if LINCOLN was
  841.      given as an answer to the question. As many WRONG statements as are
  842.      needed may appear. If no matching text is given and no match is found
  843.      for those @WRONG statements which have an answer, then the text
  844.      following the @WRONG without an answer is displayed. An example of
  845.      using several @WRONG statements is as follows:
  846.  
  847.      @WRONG (*c*) EXACT NOCASE
  848.      No. He wrote the Declaration of Independence.
  849.      @WRONG
  850.      You must answer either A, B, C, or D.
  851.      @WRONG FINAL
  852.      The answer was C, George Washington.
  853.  
  854.      Once the text for the @WRONG statement is displayed, the question is
  855.      displayed again, beginning with any text following the @BEGIN.
  856.      Therefore, it may be necessary to use the command
  857.  
  858.      .pause (*Please press ENTER to continue*)
  859.  
  860.      To allow the user to read the reply to the wrong answer before trying
  861.      the same question again, or going on to the next question. When @WRONG
  862.      FINAL is indicated, the text following is displayed when all tries are
  863.      exhausted, and no right answer has been given. This can be used to
  864.      give the student a reference to find the right answer, or to indicate
  865.      what correct answer had been expected.
  866.  
  867.      EXAMPLE QUESTION SECTION
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.                              Become a Registered User
  883.  
  884.  
  885.                                         15
  886.  
  887.      @BEGIN QUESTION
  888.      @TRIES 3
  889.      Many patriots of the American Revolution served in the
  890.      government of the new republic. Who was the first
  891.      president of the United States?
  892.  
  893.      A)Paul Revere
  894.      B)George Washington
  895.      C)Thomas Jefferson
  896.      D)Benjamin Franklin
  897.  
  898.      @READ (*Enter the letter of the correct answer :*)
  899.      @RIGHT (*b*) EXACT NOCASE
  900.  
  901.      Very Good! George Washington was the first president
  902.      of the United States.
  903.  
  904.      @WRONG (*c*) EXACT NOCASE
  905.  
  906.      No. He wrote the Declaration of Independence.
  907.      @WRONG
  908.  
  909.      You must answer either A, B, C, or D.
  910.      @WRONG FINAL
  911.  
  912.      The answer was C, George Washington.
  913.      @END QUESTION
  914.  
  915.                              USING DOT COMMANDS (.)
  916.  
  917.      The following is an explanation of the "dot" commands. Unlike the
  918.      @ (at) commands which are restricted in where they may be placed,
  919.      dot commands may appear anywhere in the PC-CAI program flow. Items
  920.      in the descriptions of the command that appear in brackets [] are
  921.      optional.
  922.  
  923.                                     .ANIMATE
  924.  
  925.      ANIMATE several images together on the screen.
  926.  
  927.      FORMAT:.ANIMATE (X1,Y1)-(X2,X2) [STEPX=#] [STEPy=#] [PAUSE=#]
  928.  
  929.      X1,Y1 and X2,Y2 are the beginning and ending points for the animation.
  930.      Be careful that these points allow the entire image to appear on the
  931.      screen. Otherwise, you could get an error. The options STEPX, STEPY
  932.      and PAUSE have to do with how fast the image will go. STEPX is
  933.      horizontal movement, STEPY is vertical movement and PAUSE is how much
  934.      to pause between images. The defaults are STEPX=5, STEPY=5 and PAUSE =
  935.      0.1. A simple example is given in the following statements:
  936.  
  937.           .SCREEN 1
  938.           .LOAD RUNNER1,RUNNER2,RUNNER3,RUNNER4
  939.           .ANIMATE (1,100)-(100,100) STEPX=2 STEPY=0 PAUSE=0.1
  940.  
  941.                              Become a Registered User
  942.  
  943.  
  944.                                         16
  945.  
  946.  
  947.                                      .BLANK
  948.  
  949.      Format :.BLANK ##
  950.  
  951.      Purpose: Specifies that ## (a number) blank lines are to be printed.
  952.      This may be used to erase selected lines on the screen. For example,
  953.      if lines 5 to 10 are to be blanked out:
  954.  
  955.      .LOCATE 5,1
  956.      .BLANK 6
  957.  
  958.                                      .CENTER
  959.  
  960.      The CENTER command centers text on the screen.
  961.  
  962.      Format :.CENTER [(*text*)]
  963.  
  964.      Example:
  965.  
  966.      .cen (*This line will be centered on the screen.*)
  967.  
  968.                                  .CLS or .CLEAR
  969.  
  970.      The CLS or CLEAR command clears the screen.
  971.  
  972.      Format :.CLS or .CLEAR
  973.  
  974.                                      .CIRCLE
  975.  
  976.      The CIRCLE command allows you to draw circles or portions of circles
  977.      on a graphics screen.
  978.  
  979.      FORMAT:.CIR CENTER=(x,y) RADIUS=n
  980.  
  981.      where x and y is the location for the center of the circle, and n is
  982.      the radius.
  983.  
  984.      Optional commands are
  985.  
  986.       COLOR=n    n=0,1,2 according to palette
  987.       START=a STOP=b  where a and b are in radians
  988.       ASPECT=n   n is numerator of n/12, where 10/12 is normal aspect
  989.  
  990.      for medium resolution and 5/12 is normal for high resolution. (See
  991.      your BASIC manual for a more complete explanation of aspect) Example:
  992.  
  993.      .CIR CENTER=(100,100) RADIUS=30 ASPECT=6 COLOR=2
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.                              Become a Registered User
  1001.  
  1002.  
  1003.                                         17
  1004.  
  1005.                            .COLOR (In SCREEN mode 0)
  1006.  
  1007.      The COLOR command in screen mode 0 is used to specify color changes.
  1008.  
  1009.      Format :.COLOR [foreground[,background] [NORMAL,REVERSE]
  1010.  
  1011.      Foreground and background refer to designations described below.
  1012.  
  1013.      Remarks: The designation may be a number from 0 to 31, or the words
  1014.      NORMAL or REVERSE. NORMAL causes the monitor to be in normal color
  1015.      mode. Reverse causes the monitor to be in reverse video. The other
  1016.      color designations, which are specified by number, cause the text to
  1017.      be printed in various colors.
  1018.  
  1019.      If you are using a monochrome monitor, those color designations are
  1020.      as follows:
  1021.  
  1022.      0, 2-6          White on black (normal)
  1023.      1               Underlined
  1024.      7               Invisible
  1025.      8,10-15         High Intensity, White on Black
  1026.      9               High Intensity, Underlined
  1027.      16,18-23        Blinking
  1028.      17              Blinking, Underlined
  1029.      24,26-31        High Intensity, Blinking
  1030.      25              Blinking, Underlined, High Intensity
  1031.  
  1032.  
  1033.      If you have the Color/Graphics Monitor, the following colors are
  1034.      displayed:
  1035.  
  1036.      0 Black         8 Gray
  1037.      1 Blue          9 Light Blue
  1038.      2 Green         10 Light Green
  1039.      3 Cyan          11 Light Cyan
  1040.      4 Red           12 Light Red
  1041.      5 Magenta       13 Light Magenta
  1042.      6 Brown         14 Yellow
  1043.      7 White         15 High Intensity White
  1044.  
  1045.      To creating a blinking color, add 16 to these colors. That is, 4+16=20
  1046.      will create blinking red. The command ".COLOR 9" will cause text to be
  1047.      displayed as light blue, with a black (default) background. The
  1048.      command ".color 25,4" would cause text to be blinking blue on a red
  1049.      background.
  1050.  
  1051.      .COLOR (In SCREEN mode 1)
  1052.  
  1053.      In SCREEN 1 mode, the COLOR command may be used in changing
  1054.      the background color and palette. In SCREEN 1 mode, the
  1055.      color command is
  1056.  
  1057.      .COLOR BACKGROUND,PALETTE
  1058.  
  1059.                              Become a Registered User
  1060.  
  1061.  
  1062.                                         18
  1063.  
  1064.  
  1065.      Palette 0 causes text to be brown, 1 is white. For example, the
  1066.      command
  1067.  
  1068.      .COLOR 4,0
  1069.  
  1070.      will give you brown text on a red background.
  1071.  
  1072.              Background colors are:
  1073.  
  1074.      0 Black            1 Blue          2 Green
  1075.      3 Blue             4 Red           5 Purple
  1076.      6 Brown            7 White         8 Gray
  1077.      9 Lt. Blue         10 Lt. Green    11 Lt. Blue
  1078.      12 Lt. Red         13 Lt. Purple   14 Lt. Yellow
  1079.      15 Bright White
  1080.  
  1081.      EXAMPLE: Changing colors in Screen mode 1:
  1082.  
  1083.           .screen 1
  1084.           .color 4,0
  1085.           This is Brown on Red
  1086.           .pause
  1087.  
  1088.           .cls
  1089.           .color 4,1
  1090.           Now its White on Red
  1091.           .pause
  1092.  
  1093.  
  1094.                                      .DRAW
  1095.  
  1096.      The DRAW command allows you to draw a picture consisting of lines
  1097.      on a graphics screen. The format of the command is:
  1098.  
  1099.      FORMAT:.DRAW (*information*)
  1100.  
  1101.      where the "information" is a series of commands which indicate how
  1102.      to draw the picture. The "n" in each command represents the distance
  1103.      moved. (see also .LINE) Some DRAW commands are:
  1104.  
  1105.      Un    Move Up n pixels
  1106.      Dn    Move Down n pixels
  1107.      Ln    Move Left n pixels
  1108.      Rn    Move Right n pixels
  1109.      En    Move Diagonally up and right
  1110.      Fn    Move diagonally down and right
  1111.      Gn    Move diagonally down and left
  1112.  
  1113.      Meanings for the commands H, M, B, N A, C and S commands are in the
  1114.      PC-BASIC or MS-BASIC manual.
  1115.  
  1116.      Example: .DRAW (*U10L20R30D50*)
  1117.  
  1118.                              Become a Registered User
  1119.  
  1120.  
  1121.                                         19
  1122.  
  1123.  
  1124.                                       .GET
  1125.  
  1126.      To place an image on the screen, you must first GET the image using
  1127.      the .GET command. The format of the command is:
  1128.  
  1129.      FORMAT:.GET filename
  1130.  
  1131.      The filename is the name under which the image is saved.  For example,
  1132.      suppose you have an image named PC.IMG. To get the image, and then
  1133.      place it on the screen in location 100,100, you would use the
  1134.      following commands:
  1135.  
  1136.      .GET PC.IMG
  1137.      .PUT 100,100
  1138.  
  1139.                                   .INFORMATION
  1140.  
  1141.      Format: .INFORMATION ## (*text*) [CONDITIONAL]
  1142.  
  1143.      Reads information about the user that may be used for documentation
  1144.      purposes. Up to 10 ".INF" statements may appear. ## may be 1 to 10.
  1145.  
  1146.      This information is useful when documentation of a student's
  1147.      performance on a tutorial or test is needed. The information may be
  1148.      sent to a line printer at the end of the session, or may be stored in
  1149.      a file for future evaluation. See the @STOP command. The ## may
  1150.      consist of the numbers 1 to 10. Once an information field is
  1151.      established, it may be used in text by embedding (.inf ##) in the
  1152.      text. That is, a "(.inf" plus the number of the information, followed
  1153.      by a ")".
  1154.  
  1155.      For example, suppose you wished to use the student's first name
  1156.      within a tutorial, you would find it out with the command
  1157.  
  1158.      .INF 1 (*Please enter your first name :*)
  1159.  
  1160.      and then you could use it in text to personalize the tutorial...
  1161.  
  1162.      Very good, (.inf 1), that was the right answer!
  1163.  
  1164.      The CONDITIONAL statement tells PC-CAI to skip the information
  1165.      question if information for that number is already been stored.
  1166.  
  1167.                                      .LINE
  1168.  
  1169.      The .LINE command allows you to draw lines on a graphic screen. The
  1170.      format of the command is:
  1171.  
  1172.      FORMAT:LINE (x,y)-(x,y)
  1173.  
  1174.      The screen must be in graphics mode. The beginning and ending of the
  1175.      line are specified by the two (x,y) parameters in the command. See the
  1176.  
  1177.                              Become a Registered User
  1178.  
  1179.  
  1180.                                         20
  1181.  
  1182.      Screen command for a discussion about possible values of x and y.
  1183.  
  1184.  
  1185.                                      .LOAD
  1186.  
  1187.      FORMAT:.LOAD file1,file2[,file3,file4]
  1188.  
  1189.      The LOAD command loads images (.IMG type files) into CAI memory for
  1190.      use in an animation sequence. Be sure they are specified in the order
  1191.      that they are to appear in the animation. (See .Animate)
  1192.  
  1193.                                      .LOCATE
  1194.  
  1195.      The .LOCATE command locates the cursor on the display. The format of
  1196.      the command is:
  1197.  
  1198.      Format:.LOCATE y,x
  1199.  
  1200.      Y may range from 1 to 25, and designates horizontal row. X may
  1201.      range from 1 to 80 and designates vertical column. An example of
  1202.      this command is:
  1203.  
  1204.      .LOCATE 13,1
  1205.  
  1206.      This text is on the middle line of the screen
  1207.  
  1208.                                      .MOVE
  1209.  
  1210.      The .MOVE command moves an image from one location to another on a
  1211.      graphics screen. The format of the command is:
  1212.  
  1213.      FORMAT:.MOVE (x,y)-(x,y) [STEPS=n]
  1214.  
  1215.      Steps specifies how many steps to take. A small number or steps causes
  1216.      a fast move, and a large number of steps causes a slow move. For a
  1217.      discussion about the possible values of x and y, see the SCREEN
  1218.      command.
  1219.  
  1220.                                      .PAINT
  1221.  
  1222.      The .Paint command fills in a closed graphic object with a color. The
  1223.      format is:
  1224.  
  1225.      FORMAT:.PAINT CENTER=(x,y) [COLOR=n1] [BOUND=n2]
  1226.  
  1227.      where x and y are location within an object,
  1228.  
  1229.      n1 is the color to paint
  1230.      n2 is the color of the boundary.
  1231.  
  1232.      Painting will fill from the "center" to the boundary in all
  1233.      directions. If the boundary is not solid, the entire screen will be
  1234.      painted.
  1235.  
  1236.                              Become a Registered User
  1237.  
  1238.  
  1239.                                         21
  1240.  
  1241.  
  1242.                                     .PALETTE
  1243.  
  1244.      When a color monitor is used, and SCREEN 1 is selected, a palette
  1245.      of colors is selectable. The command is
  1246.  
  1247.      FORMAT:.PALETTE n
  1248.  
  1249.      where n is 0, 1 or 2, which selects the palette of colors. Only
  1250.      four colors at a time can be used, the background color plus three
  1251.      selectable colors, according to which palette is being used.
  1252.  
  1253.                                      .PAUSE
  1254.  
  1255.      Format:.PAUSE [(*text*)]
  1256.  
  1257.      Pause causes output to be suspended until any key is
  1258.      pressed. Example:
  1259.  
  1260.      .PAUSE (*Please press ENTER to continue*).
  1261.  
  1262.                                      .PLAY
  1263.  
  1264.      Format:.PLAY (*designation*)
  1265.  
  1266.      Play creates sound effects. The designation contains a string of
  1267.      characters which specify notes to be played:
  1268.  
  1269.      A to G with optional # or + to designate sharp, and - to designate
  1270.      flat.
  1271.  
  1272.      Ln sets the length of each note where n ranges from 1 to 64. L2
  1273.      indicates a half note, and L8 an eighth note, etc.
  1274.  
  1275.      MF designates music foreground. Program halts until music is finished
  1276.      playing.
  1277.  
  1278.      MB designates music background. Music plays while execution of program
  1279.      continues.
  1280.  
  1281.      MN music normal. Each note is played 7/8 of the time specified by Ln.
  1282.  
  1283.      ML music legato. Music play a full period.
  1284.  
  1285.      MS music staccato. Each note plays 3/4 of time.
  1286.  
  1287.      Nn Play note n where n may range from 0 to 84. n=0 means rest. Note 1
  1288.      is the lowest octave C.
  1289.  
  1290.      On Octave n where n may range from 0 to 7.
  1291.  
  1292.      Pn Pause, where n is as in L n.
  1293.  
  1294.  
  1295.                              Become a Registered User
  1296.  
  1297.  
  1298.                                         22
  1299.  
  1300.      Tn Tempo, where n ranges from 32 to 255, and may be used to cause
  1301.      music to speed up or slow down.
  1302.  
  1303.      Example of the PLAY command:.
  1304.  
  1305.      .PLAY (*T120O1L8CDEF2G#ABO2C*)
  1306.  
  1307.                      .PCX (Display Paintbrush type graphic)
  1308.  
  1309.      The PCX command displays PCX (Paintbrush) type graphics on the screen.
  1310.      The screen must be in a graphics mode. The format of the PC command
  1311.      is:
  1312.  
  1313.      FORMAT : .PCX filename Y,X
  1314.  
  1315.      The filename is the name of the file containing the PCX image. The Y
  1316.      and X are position locations on the screen. Example:
  1317.  
  1318.           .screen 1
  1319.           .cls
  1320.           .pcx pcxdemo.pcx 1,2
  1321.  
  1322.      This code places the screen in mode 1, clears the screen and displays
  1323.      the PCX file called pcxdemo.pcx at location 1,2. In order to correctly
  1324.      display a PCX type file, you must place CAI in the same mode as that
  1325.      which was used to create the PCX file.
  1326.  
  1327.                                      .PSET
  1328.  
  1329.      The purpose of the PSET command is to locate the graphics "pointer"
  1330.      somewhere on the screen. You may wish to place the pointer on the
  1331.      screen just prior using .DRAW.
  1332.  
  1333.      FORMAT:.PSET x,y
  1334.  
  1335.      where x is the number of pixels from the left, and y is the number of
  1336.      pixels from the top.
  1337.  
  1338.                                       .PUT
  1339.  
  1340.      FORMAT:.PUT x,y
  1341.  
  1342.      The PUT command puts the image on the screen at the specified
  1343.      location. The x,y specifies where to put the upper left corner of the
  1344.      image. If the image is placed in a position where it will not all fit
  1345.      on the screen, and error will occur. To erase an image which is
  1346.      already on the screen, you PUT the same image on top of the one to be
  1347.      erased. See the .GET command.
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.                              Become a Registered User
  1355.  
  1356.  
  1357.                                         23
  1358.  
  1359.                                      .RECORD
  1360.  
  1361.      FORMAT:.RECORD (*TEXT*) FILE=outfilename
  1362.  
  1363.      Within the TEXT field, you may use (.INF #) to record information you
  1364.      have previously gathered with the .INF command, and use (.) to record
  1365.      the last answer entered by the user. For example, the .RECORD command
  1366.      may be:
  1367.  
  1368.      .RECORD (*(.INF 1) answered (.) to Question 1*) FILE=GRADE.OUT
  1369.  
  1370.      A related command to use with the .RECORD command is the GRADE option
  1371.      in the @STOP command. Here is an example of how it works along with
  1372.      the .RECORD command. Suppose you have a tutorial as listed below:
  1373.  
  1374.           .cls
  1375.           .INF 1 (*Please enter your name:*)
  1376.           @BEGIN
  1377.           @TRIES 3
  1378.           This is a test question, (.INF 1)
  1379.           @READ(*Who invented the telephone?*)
  1380.           @RIGHT (*BELL*) nocase keyword
  1381.           That is correct!!!
  1382.           .RECORD (*(.INF 1):TELEPHONE ANSWER:RIGHT:(.)*) &
  1383.           FILE=GRADE.OUT
  1384.           @WRONG
  1385.           Try again
  1386.           .RECORD (*(.INF 1):TELEPHONE ANSWER:WRONG:(.)*) &
  1387.           FILE=GRADE.OUT
  1388.           @WRONG FINAL
  1389.           The answer is Alexander Graham Bell
  1390.           @end question
  1391.           @stop grade file=GRADE.OUT screen
  1392.  
  1393.      Notice the .RECORD and the @STOP statements. The .RECORD statement
  1394.      causes information to be written to the file GRADE.OUT recording the
  1395.      specific right and wrong answers as they are given. The @STOP command
  1396.      causes summary information to also be output to the file GRADE.OUT.
  1397.  
  1398.                                      .SCREEN
  1399.  
  1400.      FORMAT:.SCREEN n
  1401.      where n is 0,1 or 2.
  1402.  
  1403.      0 - selects the monochrome screen (non graphics, 80 columns)
  1404.      1 - selects low resolution graphics, 40 columns, 4 colors
  1405.      2 - selects high resolution graphics, 80 columns, no colors
  1406.  
  1407.      Colors are only supported on a color monitor. Low resolution graphics
  1408.      gives you a screen in which you may access points on the screen
  1409.      (called pixels) 320 pixels from left to right, and 200 from top to
  1410.      bottom. High resolution gives you 640 pixels from left to right and
  1411.      200 from top to bottom.
  1412.  
  1413.                              Become a Registered User
  1414.  
  1415.  
  1416.                                         24
  1417.  
  1418.  
  1419.      SCREEN    PIXEL    PIXEL
  1420.      MODE    HT    WIDTH    NOTES
  1421.      ------    ------    -------    -------------
  1422.      0            not a graphic mode
  1423.      1    200    320    low resolution mode
  1424.      2    200    640    high resolution mode
  1425.  
  1426.      Other SCREEN modes may be available depending on your monitor type.
  1427.  
  1428.      SCREEN COORDINATES
  1429.  
  1430.      Points on the screen will often be referenced by two numbers, the
  1431.      first is horizonal (left to right), and the second is vertical (up and
  1432.      down). The "home" position (0,0) is the upper left corner of the
  1433.      screen. For example, the location 100,200 would mean the location 100
  1434.      pixels down the screen, and 200 pixels right of the left border of the
  1435.      screen.
  1436.  
  1437.  
  1438.                                      .SKIP
  1439.  
  1440.      Format :.SKIP ##
  1441.  
  1442.      Causes the cursor to skip down the screen ## number of lines. Example:
  1443.  
  1444.      .SKIP 4
  1445.  
  1446.  
  1447.                                       .USE
  1448.  
  1449.      The purpose or the .USE command is to allow you to temporary bring
  1450.      in a series of commands (like a subroutine) which is stored in a
  1451.      separate file.
  1452.  
  1453.      Format: .USE PROG=programname
  1454.  
  1455.      The .USE commands will turn over the program stream to the indicated
  1456.      USE file until the end of that file is reached, at which time the
  1457.      program stream will return to the main program. Example:Suppose you
  1458.      often used a certain paragraph you have stored in a file B:OFTEN.CAI.
  1459.      The command to insert that program code is:
  1460.  
  1461.      .USE PROG=B:OFTEN.CAI
  1462.  
  1463.  
  1464.                                      .WAIT
  1465.  
  1466.      Format: .WAIT #
  1467.  
  1468.      This command causes the program to wait # seconds before continuing.
  1469.      Example:
  1470.  
  1471.  
  1472.                              Become a Registered User
  1473.  
  1474.  
  1475.                                         25
  1476.  
  1477.      .WAIT 30
  1478.  
  1479.  
  1480.                                 EXAMPLE TUTORIAL
  1481.  
  1482.      Following example will give you ideas about how to use the @ command
  1483.      and . command. These examples include a question and answer session
  1484.      with no branching, branching and the .USE command.
  1485.  
  1486.  
  1487.           .SKIP 10
  1488.           .CENTER(*This is an example of Branching in CALL*)
  1489.           .SKIP 2
  1490.           .USE PROG=USEFIL
  1491.           .SKIP 1
  1492.           .PAUSE (*Please press ENTER*)
  1493.           @GOTO:ROBIN
  1494.           This will not be printed, since we skipped it.
  1495.           @LABEL:BATMAN
  1496.           This is text which follows the BATMAN label, which is
  1497.           only printed when I go BACK to it using a GOBACK
  1498.           command.
  1499.  
  1500.           .pause (*Please press ENTER*)
  1501.           @LABEL:ROBIN
  1502.           @BEGIN QUESTION
  1503.           .CLS
  1504.  
  1505.           Now we are in a Question section. The question for the
  1506.           day is... Did the SUN rise this morning?
  1507.  
  1508.           HINT:The correct answer is Yes. However, to test out
  1509.           the branching, you might want to see what happens when
  1510.           you answer NO.
  1511.  
  1512.           @READ(*ENTER YOUR ANSWER:*)
  1513.           @RIGHT (*Yes*) KEYWORD
  1514.           .play (*mfo2l16cdefgabo3c*)
  1515.           @END
  1516.           @IF RIGHT then GOTO:RIGHTANSWER
  1517.           .SKIP 2
  1518.           This question is only asked if you answered the SUN
  1519.           question WRONG
  1520.  
  1521.           It is a very special day in which the SUN does not come
  1522.           up.  In fact, when that happens, there won't be a day
  1523.           at all, will  there? Of course, it could be 3 o'clock
  1524.           in the morning, or there could be a cloud cover, which
  1525.           would make it seem like  there was no sun rise.
  1526.  
  1527.           @BEGIN QUESTION
  1528.           Did the SUN rise yesterday morning? The answer is YES
  1529.           whether you like it or not!
  1530.  
  1531.                              Become a Registered User
  1532.  
  1533.  
  1534.                                         26
  1535.  
  1536.  
  1537.           @READ (*Enter your answer here:*)
  1538.           @RIGHT(*YES*) FORCE NOCASE
  1539.           .play (*mfo2l16cdefgabo3c*)
  1540.  
  1541.           @END QUESTION
  1542.           @GOTO :SKIP
  1543.           @LABEL:RIGHTANSWER
  1544.  
  1545.           This part of the program is performed if the first SUN
  1546.           question is answered CORRECTLY.
  1547.  
  1548.           @LABEL:skip
  1549.           @BEGIN QUESTION NOCOUNT
  1550.  
  1551.           DO YOU WANT TO STOP THIS?
  1552.  
  1553.           @READ(*ENTER Y or N :*)
  1554.           @RIGHT (*Y*) EXACT NOCASE
  1555.           @END QUESTION
  1556.           @IF RIGHT then GOTO:END
  1557.  
  1558.           Okay, then , I'm going back...
  1559.  
  1560.           @GOBACK:BATMAN
  1561.           @LABEL:END
  1562.           .PAUSE (*This is the END!!!  Press Enter *)
  1563.           @STOP MENU
  1564.  
  1565.  
  1566.      THIS IS THE "USE" FILE USED IN THE EXAMPLE ABOVE:
  1567.  
  1568.           .PLAY(*mbo1l4cdefgabo2c*)
  1569.  
  1570.           This text was brought into the stream of the program by
  1571.           a .USE command. This program takes you through some
  1572.           exercises in branching, which will help you
  1573.           understanding what may be  performed with the commands:
  1574.  
  1575.                                            @GOTO
  1576.                                           @GOBACK
  1577.                                             @IF
  1578.                                            @LABEL
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.                              Become a Registered User
  1591.  
  1592.  
  1593.                                         27
  1594.  
  1595.      USING GRAPHICS COMMANDS
  1596.  
  1597.      There are two kinds of graphics that you can create in a PC-CAI
  1598.      program. One is character graphics and the other is pixel graphics.
  1599.      Character graphics are pictures that are made up of printable
  1600.      characters such as the characters - (dash) and | (vertical bar). Pixel
  1601.      graphics are drawings that can access every dot on the screen -- you
  1602.      can draw lines, circles, and so on. The following sections give some
  1603.      hints about using both character and pixel based graphics.
  1604.  
  1605.      USING CHARACTER BASED GRAPHICS
  1606.  
  1607.      Character based graphics use the ASCII character set and the IBM
  1608.      extended character set to form pictures on the screen. Character based
  1609.      graphics are the only kinds of graphics you can use in screen mode 0.
  1610.      The DEMO and CREATE programs use several examples of character based
  1611.      graphics. For example, the picture of the PC and the keyboard in the
  1612.      DEMO program are character based. These pictures made up mostly of
  1613.      extended ASCII characters.
  1614.  
  1615.      DRAWING WITH EXTENDED ASCII CHARACTERS
  1616.  
  1617.      To get an extended ASCII character to appear on the screen, you must
  1618.      use the following technique:
  1619.  
  1620.      1. You must know the ASCII number of the character. For example, the
  1621.      ASCII code for the pound sign (£) is 156.
  1622.  
  1623.      2. Place the cursor on the screen where you want the character to
  1624.      appear.
  1625.  
  1626.      3. Hold the ALT key down (on the left side of the keyboard) and while
  1627.      holding it down, type in the number of the character on the numeric
  1628.      keypad at the right of the keyboard.
  1629.  
  1630.      4. When you let the ALT key up, the character desired should appear.
  1631.  
  1632.      USING PIXEL BASED GRAPHICS
  1633.  
  1634.      In order to use pixel based graphics commands in PC-CAI, you must be
  1635.      using a monitor which will support these graphics. There are two CGA
  1636.      graphics modes, low resolution and high resolution. Monitors
  1637.      supporting this are composite graphics, CGA (RGB), EGA, MCGA, PGA, and
  1638.      VGA. Hercules graphic monitors are not currently supported -- however
  1639.      there are programs that will allow you to perform CGA graphics on a
  1640.      Hercules monitor.
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.                              Become a Registered User
  1650.  
  1651.  
  1652.                                         28
  1653.  
  1654.      CAI-UTIL PROGRAM
  1655.  
  1656.      The program CAI-UTIL contains several programs to support you use of
  1657.      PC-CAI. The program includes:
  1658.  
  1659.      1) The IMAGE Program
  1660.      2) Set Up defaults for PC-CAI editor
  1661.      3) Set Up Defaults for CREATE program.
  1662.      4) Encode or Decode a File.
  1663.  
  1664.      To begin the utilities program, enter
  1665.  
  1666.      C>CAI-UTIL
  1667.  
  1668.      USING THE IMAGE PROGRAM
  1669.  
  1670.      To use the IMAGE program, begin the Utility program and select "Begin
  1671.      IMAGE Program" from the menu. You will be asked if you want to create
  1672.      a new image, or edit and old image. Press the N key to select New or O
  1673.      to select Old.
  1674.  
  1675.      As you edit, the image will appear on the screen. An example screen
  1676.      using the BEETLE is displayed below. An copy of the image in the
  1677.      actual size it will be displayed in CAI is displayed at the upper
  1678.      right. To edit the image, move the graphic cursor with the arrow keys
  1679.      (and Home, End, PgDn and PgUp). Press a 0, 1, 2 or 3 key to select the
  1680.      color of a spot in the image. If you are editing a large image, you
  1681.      may only have black and white to work with. Images displayed in high
  1682.      resolution mode will be in black and white on the screen. Save the
  1683.      image by pressing S for save.
  1684.  
  1685.      ENCODING AND DECODING FILES
  1686.  
  1687.      To prevent unauthorized snooping at the contents of a CAI file, the
  1688.      Encode/Decode program provides you with a method to "scramble" the
  1689.      contents of a file by encoding it. To encode a file, you must first
  1690.      supply a password and the file name of the file to be encoded as well
  1691.      as a new name for the encoded file. PC-CAI will run an encoded file as
  1692.      a program without you having to supply a password.
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.                              Become a Registered User
  1709.  
  1710.  
  1711.                                         29
  1712.  
  1713.      APPENDIX I, USER'S BALLOT: Please indicate your preference for
  1714.      improvements in PC-CAI. On a scale of 0 to 10
  1715.  
  1716.      0 = Very Low priority for this change
  1717.      10 = Very High priority for this change
  1718.  
  1719.      Vote    Proposed item of change
  1720.      ---------------------------------------------------------------
  1721.      ____     Provide a "question bank" from which to store
  1722.          and select questions at random or from a list.
  1723.      ____     Support output/control of VCR devices.
  1724.      ____     Support calculation ability in program.
  1725.      ____     Make display to screen faster
  1726.      ____     Support mouse/joystick
  1727.      ____     Improve "grading" procedures
  1728.      ____     Make the editor more like WordStar
  1729.      ____     Support subroutines in the language
  1730.      ____     ________________________________________
  1731.      ____     ________________________________________
  1732.      Comments:
  1733.  
  1734.  
  1735.  
  1736.      APPENDIX II, Bug Report for PC-CAI
  1737.  
  1738.      Explain in detail the problem that occurred. If possible, send a print
  1739.      out of the results or Print Screen, or send copy of the PC-CAI code
  1740.      that caused problems.
  1741.  
  1742.      Brand/Model computer you use:______________________________
  1743.      Monitor Type:_____________________________________________
  1744.      Amount of memory (RAM):__________________________________
  1745.      Memory Resident Programs in Use:___________________________
  1746.      Problem:
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.      Mail to:TexaSoft, P.O. Box 1169, Cedar Hill, Texas 75104.
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.                              Become a Registered User
  1768.  
  1769.  
  1770.                                         30
  1771.  
  1772.      APPENDIX III, ERROR CODES
  1773.  
  1774.      These are selected error codes. A complete selection can be found
  1775.      in the IBM PC BASIC language manual.
  1776.      7 - Out of memory
  1777.      24 - Device timeout (ie printer)
  1778.      25 - Device fault
  1779.      27 - Out of paper
  1780.      51 - Internal error
  1781.      58 - File already exists
  1782.      61 - Disk full
  1783.      64 - Bad file name
  1784.      67 - Too many files on disk
  1785.      68 - Device unavailable (ie printer)
  1786.      70 - Disk is write protected
  1787.      71 - Disk not ready
  1788.      72 - Disk Media error (hardware or media fault)
  1789.  
  1790.      APPENDIX IV, DISTRIBUTING PROGRAMS WRITTEN IN PC-CAI
  1791.  
  1792.      You may distribute programs written in PC-CAI without royalty under
  1793.      the following conditions. That is, you may distribute the run-time
  1794.      program CAI.EXE with your commercial or non-commercial programs.
  1795.  
  1796.      1. Your copyright screen on your program should include the phrase:
  1797.  
  1798.      Portions (C)Copyright TexaSoft, Alan C. Elliott, 1983-1990
  1799.  
  1800.      2. You must be a registered PC-CAI user, having paid the registration
  1801.      fee directly to TexaSoft.
  1802.  
  1803.      If you give away or distribute the PC-CAI disk, include all files,
  1804.      unaltered. Always mention that this is a shareware product, and users
  1805.      are expected to register. You may not photocopy and distribute the
  1806.      PC-CAI manual. Please help by encouraging the registration of
  1807.      copyrighted shareware programs so that these programs may be updated
  1808.      and improved on a regular basis. Thanks.
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.                                         31
  1830.  
  1831.